let obj = {
  a: 1,
  b: 2,
  c: 3,
}

function getObjValue<T extends object, K extends keyof T>(obj: T, key: K) {
  return obj[key]
}

getObjValue(obj, "a")
